<?php

class AjaxController extends CController
{	
	public function actionModels()
	{
		if (Yii::app()->request->isAjaxRequest && isset($_POST['MFA_ID']))
        {
			echo json_encode(Catalog::getModels($_POST['MFA_ID']));
		}
	}
	
	public function actionTypes()
	{
		if (Yii::app()->request->isAjaxRequest && isset($_POST['MOD_ID']))
        {
			echo json_encode(Catalog::getTypes($_POST['MOD_ID']));
		}
	}
}